export const sizeList = [
  {
    label: '按画布尺寸',
    name: '按画布尺寸',
    width: 1,
    height: 1,
  },
  {
    label: '1:1',
    name: '头像',
    width: 1,
    height: 1,
  },
  {
    label: '1:2',
    name: '海报',
    width: 1,
    height: 2,
  },
  {
    label: '4:3',
    name: '文章配图',
    width: 4,
    height: 3,
  },
  {
    label: '3:4',
    name: '社交媒体',
    width: 3,
    height: 4,
  },
  {
    label: '2:1',
    name: 'banner图',
    width: 2,
    height: 1,
  },
  {
    label: '16:9',
    name: '电脑壁纸',
    width: 16,
    height: 9,
  },
  {
    label: '9:16',
    name: '海报图',
    width: 9,
    height: 16,
  },
]

export const drawList = [
  {
    label: '低画质',
    id: 0.25,
  },
  {
    label: '中画质',
    id: 0.5,
  },
  {
    label: '高画质',
    id: 1,
  },
]

export const renderList = [
  {
    label: '默认',
    id: 0,
  },
  {
    label: '二次元',
    id: 1,
  },
  {
    label: '平铺',
    id: 2,
  },
]

export const consistentList = [
  { label: '默认', id: 0 },
  {
    label: '角色一致',
    id: 1,
  },
  {
    label: '风格一致',
    id: 2,
  },
]

// niji风格下，可以选择的渲染选项
// https://docs.midjourney.com/docs/style
export const renderTypeList = [
  {
    label: 'default',
    id: 0,
  },
  // 原始的版本风格
  {
    label: 'original',
    id: 1,
  },
  // 可爱的
  {
    label: 'cute',
    id: 2,
  },
  // 复杂有表现力的
  {
    label: 'expressive',
    id: 3,
  },
  // 偏背景的，风景
  {
    label: 'scenic',
    id: 4,
  },
  // 自定义
  {
    label: '自定义',
    id: 5,
  },
]

export const styleList = [
  {
    label: '皮克斯科技风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 1,
    prompt:
      'pixar,technological city background,blue background, sense of technology, soft lights,illustration,',
    chinesePrompt: '皮克斯,科技城市背景,蓝色背景,科技感,柔和的灯光,插图，',
  },
  {
    label: '绘本夜晚风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 2,
    prompt: 'romantic use of light, soft, night,fantasy,starry sky background illustration,',
    chinesePrompt: '浪漫使用光线,柔和,夜晚,幻想,星空背景插图，',
  },
  {
    label: '绘本梦幻风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 3,
    prompt: 'in the style of cute and dreamy,',
    chinesePrompt: '以可爱和梦幻的风格,',
  },
  {
    label: '新海诚街道风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 4,
    prompt: 'Makoto Shinkai style,',
    chinesePrompt: '新海诚街道风格,',
  },
  {
    label: '皮克斯中国风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 5,
    prompt: 'Chinese style elements，Pixar，Full of sunlight,',
    chinesePrompt: '中国风元素,皮克斯,充满阳光,',
  },
  {
    label: '绘本风格',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 7,
    prompt: 'Children’s book illustration style, cottage punk, Rubens, realistic yet romantic,',
    chinesePrompt: '童书插画风格，乡村朋克，鲁本斯，现实而浪漫,',
  },
  {
    label: '生动色彩',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 8,
    prompt: 'vivid colors,',
    chinesePrompt: '生动的色彩,',
  },
  {
    label: '泡泡玛特塑料手办风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 9,
    prompt:
      'blind box, pop mart design, holographic, translucent, 3d model,bright light, clay material, precision mechanical parts, close-up intensitv, ultra-detailed, octane rendering, fluorescence transparent plastic armor,',
    chinesePrompt:
      '盲盒，全息，半透明，3d模型，pop-mart设计，明亮的光线，粘土材料，精密机械部件，特写强度v，超详细，辛烷值渲染，高清，荧光透明金属盔甲，C4D，搅拌机，8K,',
  },
  {
    label: '纯色背景风',
    cover:
      'https://i2.3conline.com/images/piclib/201005/06/batch/1/59330/1273083272541d5a3kfydqf.jpg',
    id: 6,
    prompt: 'Solid background style,',
    chinesePrompt: '纯色背景样式,',
  },
]


/** 历史原因没有存风格id，只能从prompt里面通过关键字查找风格id */
export const getStyleIdByPrompt = (prompt: string) => {
  const style = styleList.find((item) => prompt.indexOf(item.prompt) > -1)
  if (style) {
    return style.id
  }
  return -1
}
